package com.qf.shop.controller;

import com.qf.shop.annotation.ProcessInfo;
import com.qf.shop.entity.Orders;
import com.qf.shop.entity.ProcessLog;
import com.qf.shop.model.TableData;
import com.qf.shop.pojo.QueryOrder;
import com.qf.shop.pojo.QueryProcess;
import com.qf.shop.service.IProcessLogService;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin(origins = "*")
@RequestMapping("/process")
public class ProcessLogController {

    private IProcessLogService iProcessLogService;

    public ProcessLogController(IProcessLogService iProcessLogService) {
        this.iProcessLogService = iProcessLogService;
    }

    @GetMapping
    @ProcessInfo("查询所有操作信息")
    public TableData<ProcessLog> getAllGoods(QueryProcess queryProcess,
                                             @RequestParam(defaultValue = "0") Integer offset,
                                             @RequestParam(defaultValue = "10") Integer limit){


        TableData<ProcessLog> allProcess = iProcessLogService.getAllProcess(queryProcess, offset, limit);

        return allProcess;

    }


}
